<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>title</title>
    <script src="js/LFRect.js"></script>
</head>
<body>
<canvas id="canvas" width="900" height="600" style="border: 1px solid #000;">
亲，你的浏览器不支持canvas！！！;
</canvas>
echart:
egret:
treejs:
Konva:
<script>
    var canvas = document.getElementById('canvas');
    var ctx = canvas.getContext("2d");
    var rect = new LFRect({
        x:100,
        y:100,
        width:300,
        height:300,
        translateX:-100,
        translateY:-100,
        scaleX:1,
        scaleY:1.2,
        strokeColor:'#666',
        strokeWidth: 14
    });
    rect.renderStroke(ctx);

    var fillRect = new LFRect({
        x:300,
        y:300,
        translateX:300,
        translateY:-400,
        scaleX:1.2,
        scaleY:1.2,
        angle:20,
        width:300,
        height:300,
        fillColor:"yellow"
    });
    fillRect.renderFill(ctx);
</script>
</body>
</html>